#include <bits/stdc++.h>
using namespace std;
const int MOD = 1e8 + 7;
int qpow(int x,int p){
	int res = 1;
	while(p){
		if(p & 1){
			res = 1ll*res*x%MOD;
		}
		x = 1ll*x*x%MOD;
		p >>= 1;
	}
	return res;
}
const int inv6 = qpow(6,MOD - 2),inv2 = qpow(2,MOD - 2);
int get1(int l,int r,int h){
    int mas = min(l + r,h);
    int yt = 1ll*mas*(mas + 3)%MOD*inv2%MOD;
    if(mas > l){
        int ml = mas - l;
        yt = (yt - 1ll*ml*(ml + 1)%MOD*inv2%MOD + MOD)%MOD;
    }
    if(mas > r){
        int ml = mas - r;
        yt = (yt - 1ll*ml*(ml + 1)%MOD*inv2%MOD + MOD)%MOD;
    }
    return yt;
}
/*
|#|#|#|#|#|#|
*/
int n, m, k;
long long id(int x, int y) { return 1ll*x * (m + 2) + y; }
unordered_set<long long> points;
bool exist(int x,int y){
    if(x > n||y > m)return false;
    if(x < 0 || y < 0)return false;
    return points.find(id(x,y)) != points.end();
} 
int cnt3 = 0;
int cnt4 = 0;
void check_point(int x1,int y1,int x2,int y2){
    bool f1 = exist(x1,y1);
    if(f1){
        cnt3++;
    }
    bool f2 = exist(x2,y2);
    if(f2){
        cnt3++;
    }
    if(f1 && f2){
        cnt4++;
    }
}
int main() {
    cin >> n >> m >> k;
    int tot = 0;
    for (int i = 1; i <= min(n, m); i++) {
        tot = (tot + 1ll* i * (n - i + 1) % MOD * (m - i + 1) % MOD) % MOD;
    }
    vector<pair<int, int>> pai;
    for (int i = 1; i <= k; i++) {
        int x, y;
        cin >> x >> y;
        pai.push_back(make_pair(x, y));
        points.insert(id(x, y));
    }
    int cnt1 = 0;
    for (pair<int, int> p : pai) {
        int up = p.second, down = m - p.second, left = p.first, right = n - p.first;
		cnt1 = (cnt1 + get1(left,right,up) + get1(left,right,down) + get1(up,down,left) + get1(up,down,right))%MOD;
        cnt1 = (1ll*cnt1 + (MOD - min(left,down)) + (MOD - min(left,up)) + (MOD - min(right,up)) + (MOD - min(right,down)))%MOD;
	}
    int cnt2 = 0;
    for (int i = 0; i < pai.size(); i++) {
        for (int j = 0; j < i; j++) {
            int ycnt3 = cnt3;
            pair<int,int> p1 = pai[i],p2 = pai[j];
            if(p1.first == p2.first){    
                int len = abs(p1.second - p2.second);
                if(p1.first + second
                if(p1.first - len >= 0){
                    cnt2++;
                }
                if(len % 2 == 0 && p1.first + len/2 <= n && p1.first - len/2 >= 0){
                    cnt2++;
                    check_point(p1.first + len/2,(p1.second  + p2.second)/2,p1.first - len/2,(p1.second + p2.second)/2);
                }
            }else if(p1.second == p2.second){
                int len = abs(p1.first - p2.first);
                if(p1.second + len <= m){ 
                    cnt2++;
                }
                if(p1.second - len >= 0){
                    cnt2++;
                }
                if(len % 2 == 0 && p1.second + len/2 <= m && p1.second - len/2 >= 0){
                    cnt2++;
                    check_point((p1.first + p2.first)/2,p1.second + len/2,(p1.first + p2.first)/2,p1.second - len/2);
                }
            }else{
                if(abs(p1.first - p2.first) % 2 == abs(p1.second - p2.second)%2)
                {
                    int x1,y1,x2,y2;
                    if(abs(p1.first - p2.first) == abs(p1.second - p2.second)){
                        x1 = p1.first;
                        y1 = p2.second;
                        x2 = p2.first;
                        y2 = p1.second;
                        cnt2++;
                    }else if(abs(p1.first - p2.first) > abs(p1.second - p2.second)){
                        int dis = (abs(p1.first - p2.first) - abs(p1.second - p2.second))/2;
                        int up = max(p1.second,p2.second) + dis;
                        int down = min(p1.second,p2.second) - dis;
                        y1 = up;
                        y2 = down;
                        if(up <= m && down >= 0){
                            cnt2++;
                        }
                        if(1.0*(p1.second - p2.second)/(p1.first - p2.first) > 0){
                            x1 = min(p1.first,p2.first) + dis;
                            x2 = max(p1.first,p2.first) - dis;
                        }else{
                            x1 = max(p1.first,p2.first) - dis;
                            x2 = min(p1.first,p2.first) + dis;
                        }
                    }else{
                        int dis = (abs(p1.second - p2.second) - abs(p1.first - p2.first))/2;
                        int left = min(p1.first,p2.first) - dis;
                        int right = max(p1.first,p2.first) + dis;
                        x1 = left;
                        x2 = right;
                        if(x1 >= 0 && x2 <= n){
                            cnt2++;
                        }
                        if(1.0*(p1.second - p2.second)/(p1.first - p2.first) > 0){
                            y2 = min(p1.second,p2.second) + dis;
                            y1 = max(p1.second,p2.second) - dis;
                        }else{
                            y2 = max(p1.second,p2.second) - dis;
                            y1 = min(p1.second,p2.second) + dis;
                        }
                    }
                    check_point(x1,y1,x2,y2);
                }
                bool f = 0;
                if(p1.first > p2.first){
                    f = 1;
                    swap(p1,p2);
                }
                int len = abs(p1.first - p2.first) + abs(p1.second - p2.second);
                if(p1.second > p2.second){
                    pair<int,int> rp1 = make_pair(p1.first,p2.second);
                    if(rp1.first + len <= n && rp1.second + len <= m){
                        cnt2++;
                    }
                    pair<int,int> rp2 = make_pair(p2.first,p1.second);
                    if(rp2.first - len >= 0 && rp2.second - len >= 0){
                        cnt2++;
                    }
                }else{
                    pair<int,int> rp1 = make_pair(p1.first,p2.second);
                    if(rp1.first + len <= n && rp1.second - len >= 0){
                        cnt2++;
                    }
                    pair<int,int> rp2 = make_pair(p2.first,p1.second);
                    if(rp2.first - len >= 0 && rp2.second + len <= m){
                        cnt2++;
                    }
                }
                if(f){
                    swap(p1,p2);
                }
            }
            if(cnt3 - ycnt3){
                cout<<p1.first<<' '<<p1.second<<' '<<p2.first<<' '<<p2.second<<' '<<cnt3 - ycnt3<<'\n';
            }
        }
        
    }
    cnt4 /= 2;
    cerr<<tot<<' '<<cnt1<<' '<<cnt2<<' '<<cnt3<<' '<<cnt4<<'\n';
    int ans = ((1ll * tot - cnt1 + cnt2 - cnt3 + cnt4) % MOD + MOD) % MOD;
    cout << ans << '\n';
}
/*
2 2 4
1 0
1 2
0 1
2 1

21481 1335 35 1
21481 1335 41 1
cnt1 = cnt1 + 2cnt2 + 3cnt3 + 4cnt4
cnt2 = cnt2 + 3cnt3 + 4cnt4

*/